
package com.bear.cmcc.NetTestHTTP.component;

import com.bear.cmcc.NetTestHTTP.util.MyCommonUtil;

/**
 * 网络测试一次的结果。
 * 
 * @author suchangjun
 * @modify guanyh
 */
public class NetTestTimesInfoBean {

    private int pid;// pid

    private String downLoadTime;// 下载时长

    private String fileSize;// 下载文件大小

    private double averageSpeed;// 平均速度

    private double maxSpeed;// 最大速度

    private double minSpeed;// 最小速度

    private String downServer;// 下载服务器名

    private double waveShakeStrong;// 波形抖动强度

    private int roundID;// 关联round表的PID

    private int replayCode;// 下载信息返回码

    private String errorReason;// 下载失败原因

    private String isDelete;// 是否删除0为正常，1为删除

    private String netType;// 网络类型

    public void setPID(int _str) {
        this.pid = _str;
    }

    public int getPID() {
        return pid;
    }

    public void setDownLoadTime(String _str) {
        this.downLoadTime = _str;
    }

    public String getDownLoadTime() {
        return downLoadTime;
    }

    public void setFileSize(String _str) {
        this.fileSize = _str;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setAverageSpeed(double _str) {
        this.averageSpeed = _str;
    }

    public double getAverageSpeed() {
    	try
    	{
    		return Double.valueOf(MyCommonUtil.getFormatString(averageSpeed));
	    }catch(Exception e)
		{
			return 0;
		}
    }

    public void setMaxSpeed(double _str) {
        this.maxSpeed = _str;
    }

    public double getMaxSpeed() {
    	try
    	{
    		return Double.valueOf(MyCommonUtil.getFormatString(maxSpeed));
    	}catch(Exception e)
		{
			return 0;
		}
    }

    public void setMinSpeed(double _str) {
        this.minSpeed = _str;
    }

    public double getMinSpeed() {
    	try
    	{
    		return Double.valueOf(MyCommonUtil.getFormatString(minSpeed));
    	}catch(Exception e)
		{
			return 0;
		}

    }

    public void setDownServer(String _str) {
        this.downServer = _str;
    }

    public String getDownServer() {
        return downServer;
    }

    public void setWaveShakeStrong(double _str) {
        this.waveShakeStrong = _str;
    }
    
    public double getWaveShakeStrongDouble() {
        return waveShakeStrong;
    }

    public String getWaveShakeStrong() {
        if (waveShakeStrong>0) {
        	try
        	{
        		return MyCommonUtil.getFormatString(Double.valueOf(waveShakeStrong));
        	}catch(Exception e)
    		{
    			return "0";
    		}
        }

        return waveShakeStrong+"";
    }

    public void setRoundID(int _str) {
        this.roundID = _str;
    }

    public int getRoundID() {
        return roundID;
    }

    public void setErrorReason(String _str) {
        this.errorReason = _str;
    }

    public String getErrorReason() {
        return errorReason;
    }

    public void setReplayCode(int _str) {
        this.replayCode = _str;
    }

    public int getReplayCode() {
        return replayCode;
    }

    public void setIsDelete(String _str) {
        this.isDelete = _str;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setNetType(String _str) {
        this.netType = _str;
    }

    public String getNetType() {
        return netType;
    }

}
